#ifndef EZTHREADEVENT_H
#define EZTHREADEVENT_H

#include <QObject>
#include <QMutex>
#include "EZThreadDefine.h"
#include "EZTally/EZTallyObject.h"

class EZThread;

//class EZThreadEvent : public QEvent
//{
//public:
//    EZThreadEvent(QObject *parent = 0);

//private:
//    QMutex _runFuncMutex;

//};

class EZRunFuncEvent : public EZTally::EZTallyObject
{
public:
    EZRunFuncEvent(QObject *target,EZThreadCallBack0 func);
protected:
    virtual ~EZRunFuncEvent();

protected:
    friend class EZThread;
    QMutex _runFuncMutex;
    QObject *_target;
    EZThreadCallBack0 _callBack;
};

#endif // EZTHREADEVENT_H
